package com.ruoyi.employer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employer.mapper.CargoGoodsMapper;
import com.ruoyi.employer.domain.CargoGoods;
import com.ruoyi.employer.service.ICargoGoodsService;

/**
 * 货物信息Service业务层处理
 * 
 * @author zhk
 * @date 2024-08-13
 */
@Service
public class CargoGoodsServiceImpl implements ICargoGoodsService 
{
    @Autowired
    private CargoGoodsMapper cargoGoodsMapper;

    /**
     * 查询货物信息
     * 
     * @param id 货物信息主键
     * @return 货物信息
     */
    @Override
    public CargoGoods selectCargoGoodsById(Long id)
    {
        return cargoGoodsMapper.selectCargoGoodsById(id);
    }

    /**
     * 查询货物信息列表
     * 
     * @param cargoGoods 货物信息
     * @return 货物信息
     */
    @Override
    public List<CargoGoods> selectCargoGoodsList(CargoGoods cargoGoods)
    {
        return cargoGoodsMapper.selectCargoGoodsList(cargoGoods);
    }

    /**
     * 新增货物信息
     * 
     * @param cargoGoods 货物信息
     * @return 结果
     */
    @Override
    public int insertCargoGoods(CargoGoods cargoGoods)
    {
        return cargoGoodsMapper.insertCargoGoods(cargoGoods);
    }

    /**
     * 修改货物信息
     * 
     * @param cargoGoods 货物信息
     * @return 结果
     */
    @Override
    public int updateCargoGoods(CargoGoods cargoGoods)
    {
        return cargoGoodsMapper.updateCargoGoods(cargoGoods);
    }

    /**
     * 批量删除货物信息
     * 
     * @param ids 需要删除的货物信息主键
     * @return 结果
     */
    @Override
    public int deleteCargoGoodsByIds(Long[] ids)
    {
        return cargoGoodsMapper.deleteCargoGoodsByIds(ids);
    }

    /**
     * 删除货物信息信息
     * 
     * @param id 货物信息主键
     * @return 结果
     */
    @Override
    public int deleteCargoGoodsById(Long id)
    {
        return cargoGoodsMapper.deleteCargoGoodsById(id);
    }
}
